<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>检查报告详情</title>
    <%- include('../_global/baseLibsJKDA') %>
        <link rel="stylesheet" href="/static/css/public.css" />
        <link rel="stylesheet" href="/static/css/page-main.css" />
        <style>
            .doctor-header {
                padding: 0 15px;
                line-height: 1.1rem;
                background-color: white;
                border-bottom: 1px solid #d9d9d9;
            }

            .doctor-header h3 {
                font-size: 1.4rem;
                color: #333;
            }

            .doctor-header p {
                font-size: .92rem;
                color: #909090;
                padding-bottom: 10px;
            }

            .doctor-detail {
                background-color: white;
                padding: 10px 20px;
                color: #101010;
                font-size: .92rem;
                line-height: .92rem;
            }

            .doctor-detail div {
                line-height: 1.6rem;
            }

            .doctor-detail h5 {
                font-size: 1rem;
                padding: .5rem 0;
                /* font-weight: bold; */
            }

            .step {
                background-color: #bbe6ff;
                transform: skewX(-25deg);
                width: 5rem;
                text-align: center;
                margin: .5rem 0;
            }

            .jcbg-detail {
                border-bottom: 1px solid #d9d9d9;
            }

            .text-detail {
                margin: 15px 0;
                font-size: .9rem;
                color: #666;
                line-height: 1.3rem;
            }

            .left {
                color: #969696;
                font-size: 1rem;
            }

            .checkName {
                color: #666;
                font-size: 1rem;
            }
        </style>
</head>

<body>
    <header class="header-box grey fixed">
        <div class="header-content">
            <div class="left-tool">
                <a class="back" href="javascript:void(0);">
                    <i class="iconfont icon-back"></i>
                </a>
            </div>
            <div class="title">检查报告详情</div>
        </div>
    </header>
    <div class="doctor-header">
        <h3 class="hosName">

        </h3>
        <p>
            <span class="left">就诊时间: </span>
            <span class="checkName reportDate"></span>

        </p>
    </div>
    <div class="doctor-detail ">

    </div>
</body>
<script src="/static/js/gzd/pageUrl.js"></script>
<script src="/static/js/gzd/jkda.js"></script>
<script>
    var page_jcbg = (function ($, page_jcbg) {
        var hosName = $.QuickUrlUtils.getRequest("hosName");
        var reportDate = $.QuickUrlUtils.getRequest("reportDate");
        var zxwyh = $.QuickUrlUtils.getRequest("zxwyh");

        var jcbgData = StoreCache.getCache("jcbgData");
        
        var jcbg = JSON.parse(jcbgData);

        var cfg_def = {
            jcbgDetail: jcbgDetail,
        }
        page_jcbg.init = function (cfg) {

            $.extend(
                page_jcbg,
                cfg_def,
                cfg
            );
            $(".hosName").text(hosName);
            $(".reportDate").text(reportDate);
            console.log(jcbgData.cardType);
            console.log(jcbgData.userCardNo);

            $.QuickRemote.AjaxJson({
                funcName: "/api/gzd/jkda/queryJcbgxq",
                callback: page_jcbg.jcbgDetail,
                params: {
                    surveyingType: "1", //1门诊 2住院
                    zxwyh: zxwyh, //中心唯一号
                    reportId: jcbg.reportId, //报告id
                    medicalOrgId: jcbg.hosCode, //医疗机构代码
                    cardId: "", //检查号
                    serialNum: jcbg.jzlsh, //就诊流水号
                    cardDate: reportDate, //报告日期
                    cardType: jcbg.cardType, //卡类型(0-社保卡；1-医保卡；2-自费卡)
                    userCardNo: jcbg.userCardNo, //卡号


                    // surveyingType: "1", //1门诊 2住院
                    // zxwyh: "310225193908163614", //中心唯一号
                    // reportId: "103486616", //报告id
                    // medicalOrgId: "42501633100", //医疗机构代码
                    // cardId: "", //检查号
                    // serialNum: "", //就诊流水号
                    // cardDate: "20170117", //报告日期
                    // cardType: "0", //卡类型(0-社保卡；1-医保卡；2-自费卡)
                    // userCardNo: "P10353549", //卡号


                },
                header: true
            });
        }


        function jcbgDetail(response) {
            $(".doctor-detail").html(template("jcbgList", {
                data: response
            }));
        }

        return page_jcbg;

    })(jQuery, {});
</script>
<script type="text/html" id="jcbgList">
    {{each data}}
    <div class="jcbg-detail">
        <div>
            <span class="left">检查名称:</span>
            <span class="checkName">{{$value.checkNames}}</span>
        </div>
        <div>
            <span class="left">标本名称:</span>
            <span class="checkName">{{$value.checkPoint}}</span>
        </div>
        <div>
            <span class="left">报告医生：</span>
            <span class="hosName">{{$value.docName}}</span>
        </div>
        <!-- <div>
                    <span class="left">报告日期：</span>
                    <span class="reportDate">{{$value.reportDate}}</span>
                </div> -->
        <div>
            <span class="left">报告单号：</span>
            <span class="reportId">{{$value.reportId}}</span>
        </div>
    </div>

    <h5 class="step">影像表现:</h5>
    <p class="text-detail">{{$value.examinationFinding}}</p>

    <h5 class="step">影像诊断:</h5>
    <p class="text-detail">{{$value.imgDiagnose}}</p>
    {{/each}}
</script>

</html>